/// 		WOMEN'S EDUCATION AND ATTITUDES TOWARD MALARIA IIN CHILDREN: EVIDENCE FROM NIGERIA

								* Daniel Tuki *

* This study is based on the Malaria Indicator Survey (MIS) conducted in Nigeria in 2021. The MIS survey is part of the Demographic and Health Surveys (DHS). To access the dataset and the codebook visit: https://dhsprogram.com/data/available-datasets.cfm

* Below I have provide all the codes required to develop the relevant variables and to execute the regression models. 

* The original variable names in the MIS data are specified in square braces. 



///			OPERATIONALIZATION OF THE VARIABLES

//		 Dependent variables

* Perception of malaria's deadliness (malaria) [ml508]: This is a dummy variable that takes a value of 1 if a respondent disagrees with the statement that only weak children die from malaria, and takes a value of 0 if she agrees. "don't know/uncertain" responses were treated as missing observations (n = 860), leading to a marginal decrease in the number of observations. 
codebook ml508
gen malaria = . 
replace malaria = 1 if ml508 == 0
replace malaria = 0 if ml508 == 1


* Perception of malaria's deadliness 2 (two_malaria) [ml508]: This is an alternative operationalization of the dependent variable in which I coded the "disagree" response category as 1. I then combined the "don't know/uncertain" and "agree" responses into a single category, coding them both as 0. I merged the two responses because they do not explictiy disagree with the statement that only weak children can die from malaria. I used this to conduct a robustness check. 
codebook ml508
gen two_malaria = . 
replace two_malaria = 1 if ml508 == 0
replace two_malaria = 0 if ml508 == 1
*To code "don't know/uncertain" responses as 0
replace two_malaria = 0 if ml508 == 8



//		Explanatory variable

*Educational level (primary/secondary/higher) [v106]: This measures the highest level of education attained by the respondent.
codebook v106
* Using the subsample of women who have no education as the reference category, I developed dummy variables for those who have primary education, secondary education, and higher education: 

* Primary school (primary):
gen primary = 0
replace primary = 1 if v106 == 1

* Secondary school (secondary): 
gen secondary = 0
replace secondary = 1 if v106 == 2

* Higher education (higher)
gen higher = 0 
replace higher = 1 if v106 == 3



//		Control variables

* Age (age) [v012]
gen age = v012


*Female Household head (female_hhold_head) [v151]: This is a dummy variable that takes the value of 1 if the household head is female and 0 if male: 
gen female_hhold_head = . 
*To code women as 1
replace female_hhold_head = 1 if v151 == 2
*To code men as 0: 
replace female_hhold_head = 0 if v151 == 1


* Children born (children_born) [v201]: This is a binary variable that measures whether a woman has ever given birth or not. It was derived from the variable indicating the total number of children a woman has given birth to. If she has given birth to at least one child, this variable was coded as 1, and 0 otherwise: 
gen children_born = v201
replace children_born = 1 if children_born > 0


* Children under five (under_five) [v137]: This is a dummy that takes the value of 1 if there is at least one child under five years old livingIin the household. It was derived from the variable measuring the total number of children under five years old in the household.
codebook v137
gen under_five = v137
replace under_five = 1 if under_five > 0 

* Household Wealth (wealth_index) [v120 - v125]: This measures whether a household has certain assets. I assigned different weights to the assets depending on their value. 
* [6 = car/Truck, 5 = Motorcycle/Scooter, 4 = Bicycle, 3 = Refrigerator, 2 = Television, 1 = Radio]

* Car (car) [v125]: 
*To treat respondents who are not "dejure" residents as missing observations: 
codebook v125
replace v125 = . if v125 == 7 
gen car = 6 * v125

* Motorcycle (motorcycle) [v124]:
*To treat respondents who are not "dejure" residents as missing observations: 
codebook v124
replace v124 = . if v124 == 7
gen motorcycle = 5 * v124

* Bicycle (bicycle) [v123]: 
*To treat respondents who are not "dejure" residents as missing observations: 
codebook v123
replace v123 = . if v123 == 7
gen bicycle = 4 * v123

* Refridgerator (fridge) [v122]: 
*To treat respondents who are not "dejure" residents as missing observations: 
codebook v122
replace v122 = . if v122 == 7
gen fridge = 3 * v122

* Television (tv) [v121]: 
*To treat respondents who are not "dejure" residents as missing observations: 
codebook v121
replace v121 = . if v121 == 7
gen tv = 2 * v121

* Radio (radio) [v120]:
*To treat respondents who are not "dejure" residents as missing observations: 
codebook v120
replace v120 = . if v120 == 7
*I don't have to weigh thos variable by 1 aince it's already a dummy
gen radio = v120

* To generate the household wealth index, I sum the five items:
gen wealth_index = car + motorcycle + bicycle + fridge + tv + radio

* The wealth index ranges from 0 to 21, with higher values denoting a higher value of wealth. 


* Use of mosquito nets [ml101]: This variable is derived from a question asking respondents what kind of mosquito net they had slept under the previous night. Respondents were provided with a menu of the following three responses: "0 = no net," "1 = "only treated nets," "3 = "only untreated nets." Using the subsampole of respondents who had not slept under nets as the reference category, I developed dummy variables for the remaining two responses. 
codebook ml101

* Treated nets (treat_net): This takes a value of 1 if a respondent slept under treated nets the previous night and 0 if they either slept under an untreated net or did not sleep under a net at all. 
gen treat_net = ml101
replace treat_net = 0 if treat_net == 3
*This leaves the subsample of respondents using treated nets coded as 1. 

*Untreated nets (untreat_net): This takes a value of 1 if a respondent slept under untreated nets the previous night and 0 if they either slept under a treated net or did not sleep under a net at all. 
gen untreat_net = ml101
replace untreat_net = 0 if untreat_net == 1
replace untreat_net = 1 if untreat_net == 3



			* SUMMARY STATISTICS *
			
** Table 1: Summary Statistics

summ malaria two_malaria primary secondary higher wealth_index female_hhold_head age children_born under_five treat_net untreat_net



//			* REGRESSION MODELS *

*** Using the first dependent variale (i.e., Perception of malaria's deadliness):

** Table 2: Regressing women's perception of malaria's deadliness on educational level

* Model 1: LPM - Baseline - considering only the levels of education
regress malaria primary secondary higher i.dhsclust, vce(robust)
* To obtain the AIC statistic
estat ic

* Model 2: LPM - Adding control variables
regress malaria primary secondary higher wealth_index female_hhold_head age children_born under_five treat_net untreat_net i.dhsclust, vce(robust) 
* To obtain the AIC statistic
estat ic

* Model 3: Logit - Robustness check using alternative estimation method
logit malaria primary secondary higher wealth_index female_hhold_head age children_born under_five treat_net untreat_net i.dhsclust, vce(robust) or
* To obtain the AIC statistic
estat ic

*** Using the second depednet variable (i.e., Perception of malaria's deadliness 2):

* Model 4: LPM - Baseline - considering only the levels of education
regress two_malaria primary secondary higher i.dhsclust, vce(robust)
* To obtain the AIC statistic
estat ic

* Model 5: LPM - Adding control variables
regress two_malaria primary secondary higher wealth_index female_hhold_head age children_born under_five treat_net untreat_net i.dhsclust, vce(robust) 
* To obtain the AIC statistic
estat ic

* Model 6: Logit - Robustness check using alternative estimation method
logit two_malaria primary secondary higher wealth_index female_hhold_head age children_born under_five treat_net untreat_net i.dhsclust, vce(robust) or
* To obtain the AIC statistic
estat ic


